package pizza;

/**
 * @Auther: fei
 * @Date: 2021/6/6 - 06 - 06 - 9:33
 * @Description: pizza
 * @version: 1.0
 */
public class BaconPizza extends Pizza {
    //属性
    private double weight;

    //方法

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    //构造器

    public BaconPizza() {
    }

    public BaconPizza(String name, int size, double price, double weight) {
        super(name, size, price);
        this.weight = weight;
    }

    //重写父类方法

    @Override
    public String showPizza() {
        return super.showPizza()+"\n培根的克数为："+weight+"克";
    }
}
